home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / libx11 / include / x11 / xcms.h < prev    next >
C/C++ Source or Header  |  1999-01-01  |  23KB  |  923 lines

  1. /* $XConsortium: Xcms.h,v 1.11 91/01/27 00:31:39 alt Exp  */
  2.  
  3. /*
  4.  * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc.
  5.  *     All Rights Reserved
  6.  * 
  7.  * This file is a component of an X Window System-specific implementation
  8.  * of Xcms based on the TekColor Color Management System.  Permission is
  9.  * hereby granted to use, copy, modify, sell, and otherwise distribute this
  10.  * software and its documentation for any purpose and without fee, provided
  11.  * that this copyright, permission, and disclaimer notice is reproduced in
  12.  * all copies of this software and in supporting documentation.  TekColor
  13.  * is a trademark of Tektronix, Inc.
  14.  * 
  15.  * Tektronix makes no representation about the suitability of this software
  16.  * for any purpose.  It is provided "as is" and with all faults.
  17.  * 
  18.  * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE,
  19.  * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
  20.  * PARTICULAR PURPOSE.  IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY
  21.  * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
  22.  * RESULTING FROM LOSS OF USE, DATA, OR PROFITS, WHETHER IN AN ACTION OF
  23.  * CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  24.  * CONNECTION WITH THE USE OR THE PERFORMANCE OF THIS SOFTWARE.
  25.  *
  26.  *
  27.  *    DESCRIPTION
  28.  *        Public include file for X Color Management System
  29.  */
  30. #ifndef _XCMS_H_
  31. #define _XCMS_H_
  32.  
  33.     /*
  34.      * XCMS Status Values
  35.      */
  36. #define XcmsFailure            0
  37. #define XcmsSuccess            1
  38. #define XcmsSuccessWithCompression    2
  39.  
  40.     /*
  41.      * Color Space Format ID's
  42.      *    Color Space ID's are of XcmsColorFormat type, which is an
  43.      *    unsigned short (16 bits).  
  44.      *
  45.      *    bit 15 (most significant bit):
  46.      *        0 == Device-Independent
  47.      *        1 == Device-Dependent
  48.      *
  49.      *    bit 14:
  50.      *        0 == Registered with X Consortium
  51.      *        1 == Unregistered
  52.      */
  53. #define XcmsUndefinedFormat    (XcmsColorFormat)0x00000000
  54. #define XcmsCIEXYZFormat    (XcmsColorFormat)0x00000001
  55. #define XcmsCIEuvYFormat    (XcmsColorFormat)0x00000002
  56. #define XcmsCIExyYFormat    (XcmsColorFormat)0x00000003
  57. #define XcmsCIELabFormat    (XcmsColorFormat)0x00000004
  58. #define XcmsCIELuvFormat    (XcmsColorFormat)0x00000005
  59. #define XcmsTekHVCFormat    (XcmsColorFormat)0x00000006
  60. #define XcmsRGBFormat        (XcmsColorFormat)0x80000000
  61. #define XcmsRGBiFormat        (XcmsColorFormat)0x80000001
  62.  
  63.     /*
  64.      * State of XcmsPerScrnInfo
  65.      */
  66. #define XcmsInitNone        0x00    /* no initialization attempted */
  67. #define XcmsInitSuccess        0x01    /* initialization successful */
  68. #define XcmsInitDefault        0xff    /* initialization failed */
  69.  
  70. #define DisplayOfCCC(ccc)        ((ccc)->dpy)
  71. #define ScreenNumberOfCCC(ccc)        ((ccc)->screenNumber)
  72. #define VisualOfCCC(ccc)        ((ccc)->visual)
  73. #define ClientWhitePointOfCCC(ccc)    (&(ccc)->clientWhitePt)
  74. #define ScreenWhitePointOfCCC(ccc)    (&(ccc)->pPerScrnInfo->screenWhitePt)
  75. #define FunctionSetOfCCC(ccc)        ((ccc)->pPerScrnInfo->functionSet)
  76.  
  77. typedef unsigned int XcmsColorFormat;    /* Color Space Format ID */
  78.  
  79. typedef double XcmsFloat;
  80.  
  81.     /*
  82.      * Device RGB
  83.      */
  84. typedef struct {
  85.     unsigned short red;        /* scaled from 0x0000 to 0xffff */
  86.     unsigned short green;    /* scaled from 0x0000 to 0xffff */
  87.     unsigned short blue;    /* scaled from 0x0000 to 0xffff */
  88. } XcmsRGB;
  89.  
  90.     /*
  91.      * RGB Intensity
  92.      */
  93. typedef struct {
  94.     XcmsFloat red;    /* 0.0 - 1.0 */
  95.     XcmsFloat green;    /* 0.0 - 1.0 */
  96.     XcmsFloat blue;    /* 0.0 - 1.0 */
  97. } XcmsRGBi;
  98.  
  99.     /*
  100.      * CIE XYZ
  101.      */
  102. typedef struct {
  103.     XcmsFloat X;
  104.     XcmsFloat Y;
  105.     XcmsFloat Z;
  106. } XcmsCIEXYZ;
  107.  
  108.     /*
  109.      * CIE u'v'Y
  110.      */
  111. typedef struct {
  112.     XcmsFloat u_prime;        /* 0.0 - 1.0 */
  113.     XcmsFloat v_prime;        /* 0.0 - 1.0 */
  114.     XcmsFloat Y;        /* 0.0 - 1.0 */
  115. } XcmsCIEuvY;
  116.  
  117.     /*
  118.      * CIE xyY
  119.      */
  120. typedef struct {
  121.     XcmsFloat x;        /* 0.0 - 1.0 */
  122.     XcmsFloat y;        /* 0.0 - 1.0 */
  123.     XcmsFloat Y;        /* 0.0 - 1.0 */
  124. } XcmsCIExyY;
  125.  
  126.     /*
  127.      * CIE L*a*b*
  128.      */
  129. typedef struct {
  130.     XcmsFloat L_star;        /* 0.0 - 100.0 */
  131.     XcmsFloat a_star;
  132.     XcmsFloat b_star;
  133. } XcmsCIELab;
  134.  
  135.     /*
  136.      * CIE L*u*v*
  137.      */
  138. typedef struct {
  139.     XcmsFloat L_star;        /* 0.0 - 100.0 */
  140.     XcmsFloat u_star;
  141.     XcmsFloat v_star;
  142. } XcmsCIELuv;
  143.  
  144.     /*
  145.      * TekHVC
  146.      */
  147. typedef struct {
  148.     XcmsFloat H;        /* 0.0 - 360.0 */
  149.     XcmsFloat V;        /* 0.0 - 100.0 */
  150.     XcmsFloat C;        /* 0.0 - 100.0 */
  151. } XcmsTekHVC;
  152.  
  153.     /*
  154.      * PAD
  155.      */
  156. typedef struct {
  157.     XcmsFloat pad0;
  158.     XcmsFloat pad1;
  159.     XcmsFloat pad2;
  160.     XcmsFloat pad3;
  161. } XcmsPad;
  162.  
  163.  
  164.     /*
  165.      * XCMS Color Structure
  166.      */
  167. typedef struct {
  168.     union {
  169.     XcmsRGB RGB;
  170.     XcmsRGBi RGBi;
  171.     XcmsCIEXYZ CIEXYZ;
  172.     XcmsCIEuvY CIEuvY;
  173.     XcmsCIExyY CIExyY;
  174.     XcmsCIELab CIELab;
  175.     XcmsCIELuv CIELuv;
  176.     XcmsTekHVC TekHVC;
  177.     XcmsPad Pad;
  178.     } spec;            /* the color specification    */
  179.     unsigned long pixel;    /* pixel value (as needed)    */
  180.     XcmsColorFormat    format;        /* the specification format    */
  181. } XcmsColor;
  182.  
  183.  
  184.     /*
  185.      * XCMS Per Screen related data
  186.      */
  187.  
  188. typedef struct _XcmsPerScrnInfo {
  189.     XcmsColor    screenWhitePt;    /* Screen White point */
  190.     XPointer    functionSet;    /* pointer to Screen Color Characterization */
  191.                 /*      Function Set structure        */
  192.     XPointer    screenData;    /* pointer to corresponding Screen Color*/
  193.                 /*    Characterization Data        */
  194.     unsigned char state;    /* XcmsInitNone, XcmsInitSuccess, XcmsInitDefault */
  195.     char    pad[3];
  196. } XcmsPerScrnInfo;
  197.  
  198. typedef struct _XcmsCCC *XcmsCCC;
  199.  
  200. typedef Status (*XcmsCompressionProc)(        /* Gamut Compression Proc */
  201. #if NeedFunctionPrototypes
  202.     XcmsCCC        /* ccc */,
  203.     XcmsColor*        /* colors_in_out */,
  204.     unsigned int    /* ncolors */,
  205.     unsigned int    /* index */,
  206.     Bool*        /* compression_flags_return */
  207. #endif
  208. );
  209.  
  210. typedef Status (*XcmsWhiteAdjustProc)(         /* White Point Adjust Proc */
  211. #if NeedFunctionPrototypes
  212.     XcmsCCC        /* ccc */,
  213.     XcmsColor*        /* initial_white_point*/,
  214.     XcmsColor*        /* target_white_point*/,
  215.     XcmsColorFormat    /* target_format */,
  216.     XcmsColor*        /* colors_in_out */,
  217.     unsigned int    /* ncolors */,
  218.     Bool*        /* compression_flags_return */
  219. #endif
  220. );
  221.  
  222.     /*
  223.      * XCMS Color Conversion Context
  224.      */
  225. typedef struct _XcmsCCC {
  226.     Display    *dpy;            /* X Display */
  227.     int        screenNumber;        /* X screen number */
  228.     Visual    *visual;        /* X Visual */
  229.     XcmsColor    clientWhitePt;        /* Client White Point */
  230.     XcmsCompressionProc    gamutCompProc;    /* Gamut Compression Function */
  231.     XPointer    gamutCompClientData;    /* Gamut Comp Func Client Data */
  232.     XcmsWhiteAdjustProc    whitePtAdjProc;    /* White Point Adjustment Function */
  233.     XPointer    whitePtAdjClientData;    /* White Pt Adj Func Client Data */
  234.     XcmsPerScrnInfo *pPerScrnInfo;    /* pointer to per screen information */
  235.                     /*  associated with the above display */
  236.                     /*  screenNumber */
  237. } XcmsCCCRec;
  238.  
  239. typedef Status (*XcmsScreenInitProc)(    /* Screen Initialization Proc */
  240. #if NeedFunctionPrototypes
  241.     Display*        /* dpy */,
  242.     int            /* screen_number */,
  243.     XcmsPerScrnInfo*    /* screen_info */
  244. #endif
  245. );
  246.  
  247. typedef void (*XcmsScreenFreeProc)(
  248. #if NeedFunctionPrototypes
  249.     XPointer        /* screenData */
  250. #endif
  251. );
  252.  
  253.     /*
  254.      * Function List Pointer -- pointer to an array of function pointers.
  255.      *    The end of list is indicated by a NULL pointer.
  256.      */
  257. typedef Status (*XcmsConversionProc)();
  258. typedef XcmsConversionProc *XcmsFuncListPtr;
  259.  
  260. typedef int (*XcmsParseStringProc)(    /* Color String Parsing Proc */
  261. #if NeedFunctionPrototypes
  262.     char*        /* color_string */,
  263.     XcmsColor*        /* color_return */
  264. #endif
  265. );
  266.  
  267.     /*
  268.      * Color Space -- per Color Space related data (Device-Independent
  269.      *    or Device-Dependent)
  270.      */
  271. typedef struct _XcmsColorSpace {
  272.     char *prefix;        /* Prefix of string format.        */
  273.     XcmsColorFormat id;        /* Format ID number.            */
  274.     XcmsParseStringProc parseString;
  275.                 /* String format parsing function    */
  276.     XcmsFuncListPtr to_CIEXYZ;    /* Pointer to an array of function     */
  277.                 /*   pointers such that when the    */
  278.                 /*   functions are executed in sequence    */
  279.                 /*   will convert a XcmsColor structure    */
  280.                 /*   from this color space to CIEXYZ    */
  281.                 /*   space.                */
  282.     XcmsFuncListPtr from_CIEXYZ;/* Pointer to an array of function     */
  283.                 /*   pointers such that when the    */
  284.                 /*   functions are executed in sequence    */
  285.                 /*   will convert a XcmsColor structure    */
  286.                 /*   from CIEXYZ space to this color    */
  287.                 /*   space.                */
  288.     int inverse_flag;        /* If 1, indicates that for 0 <= i < n    */
  289.                 /*   where n is the number of function    */
  290.                 /*   pointers in the lists to_CIEXYZ    */
  291.                 /*   and from_CIEXYZ; for each function */
  292.                 /*   to_CIEXYZ[i] its inverse function    */
  293.                 /*   is from_CIEXYZ[n - i].        */
  294.  
  295. } XcmsColorSpace;
  296.  
  297.     /*
  298.      * Screen Color Characterization Function Set -- per device class
  299.      *    color space conversion functions.
  300.      */
  301. typedef struct _XcmsFunctionSet {
  302.     XcmsColorSpace **DDColorSpaces;
  303.                 /* Pointer to an array of pointers to    */
  304.                 /*   Device-DEPENDENT color spaces    */
  305.                 /*   understood by this SCCFuncSet.    */
  306.     XcmsScreenInitProc screenInitProc;
  307.                 /* Screen initialization function that    */
  308.                 /*   reads Screen Color Characterization*/
  309.                 /*   Data off properties on the screen's*/
  310.                 /*   root window.            */
  311.     XcmsScreenFreeProc screenFreeProc;
  312.                 /* Function that frees the SCCData    */
  313.                 /*   structures.            */
  314. } XcmsFunctionSet;
  315.  
  316. _XFUNCPROTOBEGIN
  317.  
  318. extern Status XcmsAddColorSpace (
  319. #if NeedFunctionPrototypes
  320.     XcmsColorSpace*    /* pColorSpace */
  321. #endif
  322. );
  323.  
  324. extern Status XcmsAddFunctionSett (
  325. #if NeedFunctionPrototypes
  326.     XcmsFunctionSet*    /* functionSet */
  327. #endif
  328. );
  329.  
  330. extern Status XcmsAllocColor (
  331. #if NeedFunctionPrototypes
  332.     Display*        /* dpy */,
  333.     Colormap        /* colormap */,
  334.     XcmsColor*        /* color_in_out */,
  335.     XcmsColorFormat        /* result_format */
  336. #endif
  337. );
  338.  
  339. extern Status XcmsAllocNamedColor (
  340. #if NeedFunctionPrototypes
  341.     Display*        /* dpy */,
  342.     Colormap        /* colormap */,
  343.     _Xconst char*    /* color_string */,
  344.     XcmsColor*        /* color_scrn_return */,
  345.     XcmsColor*        /* color_exact_return */,
  346.     XcmsColorFormat        /* result_format */
  347. #endif
  348. );
  349.  
  350. extern XcmsCCC XcmsCCCOfColormap (
  351. #if NeedFunctionPrototypes
  352.     Display*        /* dpy */,
  353.     Colormap        /* colormap */
  354. #endif
  355. );
  356.  
  357. extern Status XcmsCIELabClipab(
  358. #if NeedFunctionPrototypes
  359.     XcmsCCC        /* ccc */,
  360.     XcmsColor*        /* colors_in_out */,
  361.     unsigned int    /* ncolors */,
  362.     unsigned int    /* index */,
  363.     Bool*        /* compression_flags_return */
  364. #endif
  365. );
  366.  
  367. extern Status XcmsCIELabClipL(
  368. #if NeedFunctionPrototypes
  369.     XcmsCCC        /* ccc */,
  370.     XcmsColor*        /* colors_in_out */,
  371.     unsigned int    /* ncolors */,
  372.     unsigned int    /* index */,
  373.     Bool*        /* compression_flags_return */
  374. #endif
  375. );
  376.  
  377. extern Status XcmsCIELabClipLab(
  378. #if NeedFunctionPrototypes
  379.     XcmsCCC        /* ccc */,
  380.     XcmsColor*        /* colors_in_out */,
  381.     unsigned int    /* ncolors */,
  382.     unsigned int    /* index */,
  383.     Bool*        /* compression_flags_return */
  384. #endif
  385. );
  386.  
  387. extern Status XcmsCIELabQueryMaxC (
  388. #if NeedFunctionPrototypes
  389.     XcmsCCC        /* ccc */,
  390.     XcmsFloat        /* hue_angle */,
  391.     XcmsFloat        /* L_star */,
  392.     XcmsColor*        /* color_return */
  393. #endif
  394. );
  395.  
  396. extern Status XcmsCIELabQueryMaxL (
  397. #if NeedFunctionPrototypes
  398.     XcmsCCC        /* ccc */,
  399.     XcmsFloat        /* hue_angle */,
  400.     XcmsFloat        /* chroma */,
  401.     XcmsColor*        /* color_return */
  402. #endif
  403. );
  404.  
  405. extern Status XcmsCIELabQueryMaxLC (
  406. #if NeedFunctionPrototypes
  407.     XcmsCCC        /* ccc */,
  408.     XcmsFloat        /* hue_angle */,
  409.     XcmsColor*        /* color_return */
  410. #endif
  411. );
  412.  
  413. extern Status XcmsCIELabQueryMinL (
  414. #if NeedFunctionPrototypes
  415.     XcmsCCC        /* ccc */,
  416.     XcmsFloat        /* hue_angle */,
  417.     XcmsFloat        /* chroma */,
  418.     XcmsColor*        /* color_return */
  419. #endif
  420. );
  421.  
  422. extern Status XcmsCIELabToCIEXYZ (
  423. #if NeedFunctionPrototypes
  424.     XcmsCCC        /* ccc */,
  425.     XcmsColor*        /* white_point */,
  426.     XcmsColor*        /* colors */,
  427.     unsigned int    /* ncolors */
  428. #endif
  429. );
  430.  
  431. extern Status XcmsCIELabWhiteShiftColors(
  432. #if NeedFunctionPrototypes
  433.     XcmsCCC        /* ccc */,
  434.     XcmsColor*        /* initial_white_point*/,
  435.     XcmsColor*        /* target_white_point*/,
  436.     XcmsColorFormat    /* target_format */,
  437.     XcmsColor*        /* colors_in_out */,
  438.     unsigned int    /* ncolors */,
  439.     Bool*        /* compression_flags_return */
  440. #endif
  441. );
  442.  
  443. extern Status XcmsCIELuvClipL(
  444. #if NeedFunctionPrototypes
  445.     XcmsCCC        /* ccc */,
  446.     XcmsColor*        /* colors_in_out */,
  447.     unsigned int    /* ncolors */,
  448.     unsigned int    /* index */,
  449.     Bool*        /* compression_flags_return */
  450. #endif
  451. );
  452.  
  453. extern Status XcmsCIELuvClipLuv(
  454. #if NeedFunctionPrototypes
  455.     XcmsCCC        /* ccc */,
  456.     XcmsColor*        /* colors_in_out */,
  457.     unsigned int    /* ncolors */,
  458.     unsigned int    /* index */,
  459.     Bool*        /* compression_flags_return */
  460. #endif
  461. );
  462.  
  463. extern Status XcmsCIELuvClipuv(
  464. #if NeedFunctionPrototypes
  465.     XcmsCCC        /* ccc */,
  466.     XcmsColor*        /* colors_in_out */,
  467.     unsigned int    /* ncolors */,
  468.     unsigned int    /* index */,
  469.     Bool*        /* compression_flags_return */
  470. #endif
  471. );
  472.  
  473. extern Status XcmsCIELuvQueryMaxC (
  474. #if NeedFunctionPrototypes
  475.     XcmsCCC        /* ccc */,
  476.     XcmsFloat        /* hue_angle */,
  477.     XcmsFloat        /* L_star */,
  478.     XcmsColor*        /* color_return */
  479. #endif
  480. );
  481.  
  482. extern Status XcmsCIELuvQueryMaxL (
  483. #if NeedFunctionPrototypes
  484.     XcmsCCC        /* ccc */,
  485.     XcmsFloat        /* hue_angle */,
  486.     XcmsFloat        /* chroma */,
  487.     XcmsColor*        /* color_return */
  488. #endif
  489. );
  490.  
  491. extern Status XcmsCIELuvQueryMaxLC (
  492. #if NeedFunctionPrototypes
  493.     XcmsCCC        /* ccc */,
  494.     XcmsFloat        /* hue_angle */,
  495.     XcmsColor*        /* color_return */
  496. #endif
  497. );
  498.  
  499. extern Status XcmsCIELuvQueryMinL (
  500. #if NeedFunctionPrototypes
  501.     XcmsCCC        /* ccc */,
  502.     XcmsFloat        /* hue_angle */,
  503.     XcmsFloat        /* chroma */,
  504.     XcmsColor*        /* color_return */
  505. #endif
  506. );
  507.  
  508. extern Status XcmsCIELuvToCIEuvY (
  509. #if NeedFunctionPrototypes
  510.     XcmsCCC        /* ccc */,
  511.     XcmsColor*        /* white_point */,
  512.     XcmsColor*        /* colors */,
  513.     unsigned int    /* ncolors */
  514. #endif
  515. );
  516.  
  517. extern Status XcmsCIELuvWhiteShiftColors(
  518. #if NeedFunctionPrototypes
  519.     XcmsCCC        /* ccc */,
  520.     XcmsColor*        /* initial_white_point*/,
  521.     XcmsColor*        /* target_white_point*/,
  522.     XcmsColorFormat    /* target_format */,
  523.     XcmsColor*        /* colors_in_out */,
  524.     unsigned int    /* ncolors */,
  525.     Bool*        /* compression_flags_return */
  526. #endif
  527. );
  528.  
  529. extern Status XcmsCIEXYZToCIELab (
  530. #if NeedFunctionPrototypes
  531.     XcmsCCC        /* ccc */,
  532.     XcmsColor*        /* white_point */,
  533.     XcmsColor*        /* colors */,
  534.     unsigned int    /* ncolors */
  535. #endif
  536. );
  537.  
  538. extern Status XcmsCIEXYZToCIEuvY (
  539. #if NeedFunctionPrototypes
  540.     XcmsCCC        /* ccc */,
  541.     XcmsColor*        /* white_point */,
  542.     XcmsColor*        /* colors */,
  543.     unsigned int    /* ncolors */
  544. #endif
  545. );
  546.  
  547. extern Status XcmsCIEXYZToCIExyY (
  548. #if NeedFunctionPrototypes
  549.     XcmsCCC        /* ccc */,
  550.     XcmsColor*        /* white_point */,
  551.     XcmsColor*        /* colors */,
  552.     unsigned int    /* ncolors */
  553. #endif
  554. );
  555.  
  556. extern Status XcmsCIEXYZToRGBi (
  557. #if NeedFunctionPrototypes
  558.     XcmsCCC        /* ccc */,
  559.     XcmsColor*        /* colors */,
  560.     unsigned int    /* ncolors */,
  561.     Bool*        /* compression_flags_return */
  562. #endif
  563. );
  564.  
  565. extern Status XcmsCIEuvYToCIELuv (
  566. #if NeedFunctionPrototypes
  567.     XcmsCCC        /* ccc */,
  568.     XcmsColor*        /* white_point */,
  569.     XcmsColor*        /* colors */,
  570.     unsigned int    /* ncolors */
  571. #endif
  572. );
  573.  
  574. extern Status XcmsCIEuvYToCIEXYZ (
  575. #if NeedFunctionPrototypes
  576.     XcmsCCC        /* ccc */,
  577.     XcmsColor*        /* white_point */,
  578.     XcmsColor*        /* colors */,
  579.     unsigned int    /* ncolors */
  580. #endif
  581. );
  582.  
  583. extern Status XcmsCIEuvYToTekHVC (
  584. #if NeedFunctionPrototypes
  585.     XcmsCCC        /* ccc */,
  586.     XcmsColor*        /* white_point */,
  587.     XcmsColor*        /* colors */,
  588.     unsigned int    /* ncolors */
  589. #endif
  590. );
  591.  
  592. extern Status XcmsCIExyYToCIEXYZ (
  593. #if NeedFunctionPrototypes
  594.     XcmsCCC        /* ccc */,
  595.     XcmsColor*        /* white_point */,
  596.     XcmsColor*        /* colors */,
  597.     unsigned int    /* ncolors */
  598. #endif
  599. );
  600.  
  601. extern XcmsColor *XcmsClientWhitePointOfCCC (
  602. #if NeedFunctionPrototypes
  603.     XcmsCCC        /* ccc */
  604. #endif
  605. );
  606.  
  607. extern Status XcmsConvertColors (
  608. #if NeedFunctionPrototypes
  609.     XcmsCCC        /* ccc */,
  610.     XcmsColor*        /* colorArry_in_out */,
  611.     unsigned int    /* nColors */,
  612.     XcmsColorFormat        /* targetFormat */,
  613.     Bool*        /* compArry_return */
  614. #endif
  615. );
  616.  
  617. extern XcmsCCC XcmsCreateCCC (
  618. #if NeedFunctionPrototypes
  619.     Display*        /* dpy */,
  620.     int            /* screenNumber */,
  621.     Visual*        /* visual */,
  622.     XcmsColor*        /* clientWhitePt */,
  623.     XcmsCompressionProc /* gamutCompProc */,
  624.     XPointer        /* gamutCompClientData */,
  625.     XcmsWhiteAdjustProc    /* whitePtAdjProc */,
  626.     XPointer        /* whitePtAdjClientData */
  627. #endif
  628. );
  629.  
  630. extern XcmsCCC XcmsDefaultCCC (
  631. #if NeedFunctionPrototypes
  632.     Display*        /* dpy */,
  633.     int            /* screenNumber */
  634. #endif
  635. );
  636.  
  637. extern Display *XcmsDisplayOfCCC (
  638. #if NeedFunctionPrototypes
  639.     XcmsCCC        /* ccc */
  640. #endif
  641. );
  642.  
  643. extern XcmsColorFormat XcmsFormatOfPrefix (
  644. #if NeedFunctionPrototypes
  645.     char*        /* prefix */
  646. #endif
  647. );
  648.  
  649. extern void XcmsFreeCCC (
  650. #if NeedFunctionPrototypes
  651.     XcmsCCC        /* ccc */
  652. #endif
  653. );
  654.  
  655. extern Status XcmsLookupColor (
  656. #if NeedFunctionPrototypes
  657.     Display*        /* dpy */,
  658.     Colormap        /* colormap */,
  659.     _Xconst char*    /* color_string */,
  660.     XcmsColor*        /* pColor_exact_in_out */,
  661.     XcmsColor*        /* pColor_scrn_in_out */,
  662.     XcmsColorFormat        /* result_format */
  663. #endif
  664. );
  665.  
  666. extern char *XcmsPrefixOfFormat (
  667. #if NeedFunctionPrototypes
  668.     XcmsColorFormat        /* id */
  669. #endif
  670. );
  671.  
  672. extern Status XcmsQueryBlack (
  673. #if NeedFunctionPrototypes
  674.     XcmsCCC        /* ccc */,
  675.     XcmsColorFormat    /* target_format */,
  676.     XcmsColor*        /* color_return */
  677. #endif
  678. );
  679.  
  680. extern Status XcmsQueryBlue (
  681. #if NeedFunctionPrototypes
  682.     XcmsCCC        /* ccc */,
  683.     XcmsColorFormat    /* target_format */,
  684.     XcmsColor*        /* color_return */
  685. #endif
  686. );
  687.  
  688. extern Status XcmsQueryColor (
  689. #if NeedFunctionPrototypes
  690.     Display*        /* dpy */,
  691.     Colormap        /* colormap */,
  692.     XcmsColor*        /* pColor_in_out */,
  693.     XcmsColorFormat        /* result_format */
  694. #endif
  695. );
  696.  
  697. extern Status XcmsQueryColors (
  698. #if NeedFunctionPrototypes
  699.     Display*        /* dpy */,
  700.     Colormap        /* colormap */,
  701.     XcmsColor*        /* colorArry_in_out */,
  702.     unsigned int    /* nColors */,
  703.     XcmsColorFormat    /* result_format */
  704. #endif
  705. );
  706.  
  707. extern Status XcmsQueryGreen (
  708. #if NeedFunctionPrototypes
  709.     XcmsCCC        /* ccc */,
  710.     XcmsColorFormat    /* target_format */,
  711.     XcmsColor*        /* color_return */
  712. #endif
  713. );
  714.  
  715. extern Status XcmsQueryRed (
  716. #if NeedFunctionPrototypes
  717.     XcmsCCC        /* ccc */,
  718.     XcmsColorFormat    /* target_format */,
  719.     XcmsColor*        /* color_return */
  720. #endif
  721. );
  722.  
  723. extern Status XcmsQueryWhite (
  724. #if NeedFunctionPrototypes
  725.     XcmsCCC        /* ccc */,
  726.     XcmsColorFormat    /* target_format */,
  727.     XcmsColor*        /* color_return */
  728. #endif
  729. );
  730.  
  731. extern Status XcmsRGBiToCIEXYZ (
  732. #if NeedFunctionPrototypes
  733.     XcmsCCC        /* ccc */,
  734.     XcmsColor*        /* colors */,
  735.     unsigned int    /* ncolors */,
  736.     Bool*        /* compression_flags_return */
  737. #endif
  738. );
  739.  
  740. extern Status XcmsRGBiToRGB (
  741. #if NeedFunctionPrototypes
  742.     XcmsCCC        /* ccc */,
  743.     XcmsColor*        /* colors */,
  744.     unsigned int    /* ncolors */,
  745.     Bool*        /* compression_flags_return */
  746. #endif
  747. );
  748.  
  749. extern Status XcmsRGBToRGBi (
  750. #if NeedFunctionPrototypes
  751.     XcmsCCC        /* ccc */,
  752.     XcmsColor*        /* colors */,
  753.     unsigned int    /* ncolors */,
  754.     Bool*        /* compression_flags_return */
  755. #endif
  756. );
  757.  
  758. extern int XcmsScreenNumberOfCCC (
  759. #if NeedFunctionPrototypes
  760.     XcmsCCC        /* ccc */
  761. #endif
  762. );
  763.  
  764. extern XcmsColor *XcmsScreenWhitePointOfCCC (
  765. #if NeedFunctionPrototypes
  766.     XcmsCCC        /* ccc */
  767. #endif
  768. );
  769.  
  770. extern XcmsCCC XcmsSetCCCOfColormap(
  771. #if NeedFunctionPrototypes
  772.     Display*        /* dpy */,
  773.     Colormap        /* colormap */,
  774.     XcmsCCC        /* ccc */
  775. #endif
  776. );
  777.  
  778. extern XcmsCompressionProc XcmsSetCompressionProc (
  779. #if NeedFunctionPrototypes
  780.     XcmsCCC        /* ccc */,
  781.     XcmsCompressionProc    /* compression_proc */,
  782.     XPointer        /* client_data */
  783. #endif
  784. );
  785.  
  786. extern XcmsWhiteAdjustProc XcmsSetWhiteAdjustProc (
  787. #if NeedFunctionPrototypes
  788.     XcmsCCC        /* ccc */,
  789.     XcmsWhiteAdjustProc    /* white_adjust_proc */,
  790.     XPointer        /* client_data */
  791. #endif
  792. );
  793.  
  794. extern Status XcmsSetWhitePoint (
  795. #if NeedFunctionPrototypes
  796.     XcmsCCC        /* ccc */,
  797.     XcmsColor*        /* color */
  798. #endif
  799. );
  800.  
  801. extern Status XcmsStoreColor (
  802. #if NeedFunctionPrototypes
  803.     Display*        /* dpy */,
  804.     Colormap        /* colormap */,
  805.     XcmsColor*        /* pColor_in */
  806. #endif
  807. );
  808.  
  809. extern Status XcmsStoreColors (
  810. #if NeedFunctionPrototypes
  811.     Display*        /* dpy */,
  812.     Colormap        /* colormap */,
  813.     XcmsColor*        /* colorArry_in */,
  814.     unsigned int    /* nColors */,
  815.     Bool*        /* compArry_return */
  816. #endif
  817. );
  818.  
  819. extern Status XcmsTekHVCClipC(
  820. #if NeedFunctionPrototypes
  821.     XcmsCCC        /* ccc */,
  822.     XcmsColor*        /* colors_in_out */,
  823.     unsigned int    /* ncolors */,
  824.     unsigned int    /* index */,
  825.     Bool*        /* compression_flags_return */
  826. #endif
  827. );
  828.  
  829. extern Status XcmsTekHVCClipV(
  830. #if NeedFunctionPrototypes
  831.     XcmsCCC        /* ccc */,
  832.     XcmsColor*        /* colors_in_out */,
  833.     unsigned int    /* ncolors */,
  834.     unsigned int    /* index */,
  835.     Bool*        /* compression_flags_return */
  836. #endif
  837. );
  838.  
  839. extern Status XcmsTekHVCClipVC(
  840. #if NeedFunctionPrototypes
  841.     XcmsCCC        /* ccc */,
  842.     XcmsColor*        /* colors_in_out */,
  843.     unsigned int    /* ncolors */,
  844.     unsigned int    /* index */,
  845.     Bool*        /* compression_flags_return */
  846. #endif
  847. );
  848.  
  849. extern Status XcmsTekHVCQueryMaxC (
  850. #if NeedFunctionPrototypes
  851.     XcmsCCC        /* ccc */,
  852.     XcmsFloat        /* hue */,
  853.     XcmsFloat        /* value */,
  854.     XcmsColor*        /* color_return */
  855. #endif
  856. );
  857.  
  858. extern Status XcmsTekHVCQueryMaxV (
  859. #if NeedFunctionPrototypes
  860.     XcmsCCC        /* ccc */,
  861.     XcmsFloat        /* hue */,
  862.     XcmsFloat        /* chroma */,
  863.     XcmsColor*        /* color_return */
  864. #endif
  865. );
  866.  
  867. extern Status XcmsTekHVCQueryMaxVC (
  868. #if NeedFunctionPrototypes
  869.     XcmsCCC        /* ccc */,
  870.     XcmsFloat        /* hue */,
  871.     XcmsColor*        /* color_return */
  872. #endif
  873. );
  874.  
  875. extern Status XcmsTekHVCQueryMaxVSamples (
  876. #if NeedFunctionPrototypes
  877.     XcmsCCC        /* ccc */,
  878.     XcmsFloat        /* hue */,
  879.     XcmsColor*        /* colors_return */,
  880.     unsigned int    /* nsamples */
  881. #endif
  882. );
  883.  
  884. extern Status XcmsTekHVCQueryMinV (
  885. #if NeedFunctionPrototypes
  886.     XcmsCCC        /* ccc */,
  887.     XcmsFloat        /* hue */,
  888.     XcmsFloat        /* chroma */,
  889.     XcmsColor*        /* color_return */
  890. #endif
  891. );
  892.  
  893. extern Status XcmsTekHVCToCIEuvY (
  894. #if NeedFunctionPrototypes
  895.     XcmsCCC        /* ccc */,
  896.     XcmsColor*        /* white_point */,
  897.     XcmsColor*        /* colors */,
  898.     unsigned int    /* ncolors */
  899. #endif
  900. );
  901.  
  902. extern Status XcmsTekHVCWhiteShiftColors(
  903. #if NeedFunctionPrototypes
  904.     XcmsCCC        /* ccc */,
  905.     XcmsColor*        /* initial_white_point*/,
  906.     XcmsColor*        /* target_white_point*/,
  907.     XcmsColorFormat    /* target_format */,
  908.     XcmsColor*        /* colors_in_out */,
  909.     unsigned int    /* ncolors */,
  910.     Bool*        /* compression_flags_return */
  911. #endif
  912. );
  913.  
  914. extern Visual *XcmsVisualOfCCC (
  915. #if NeedFunctionPrototypes
  916.     XcmsCCC        /* ccc */
  917. #endif
  918. );
  919.  
  920. _XFUNCPROTOEND
  921.  
  922. #endif /* _XCMS_H_ */
  923.